<?php /* Smarty version 2.6.18, created on 2016-12-15 12:54:47
         compiled from play/index.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<style type="text/css">
.piclist {
	width:100px;
	height:100px;
	float:left;
	margin:10px 0 0 10px;
	overflow:hidden;
	border:1px solid #aaa;
}
</style>
<div id="page-wrapper">

	<div class="row">
		<div class="col-md-6">
			<a href="<?php echo $this->_tpl_vars['app']; ?>
/play/add" class="btn btn-success">添加幻灯片</a>
		</div>
		<div class="col-md-6">
			<div class="form-group input-group">
				<input type="text" class="form-control" name="key"
					placeholder="输入链接标题或者地址关键词搜索"> <span
					class="input-group-btn">
					<button class="btn btn-default" type="submit">
						<i class="fa fa-search"></i>
					</button>
				</span>
			</div>
		</div>
	</div>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/title.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<form method="post" action="<?php echo $this->_tpl_vars['url']; ?>
/del/pid/<?php echo $this->_tpl_vars['pid']; ?>
" onsubmit="return confirm('你确定要删除选中的所有图片吗?')">
		<li class="list-group-item">请选择需要编辑的幻灯片&nbsp;&nbsp; 
		</li>
		<script>
			
			function show(filename) {
				window.open(filename, '_blank',
								"top=0,left=0,width=400px,height=400px,location=yes,scrollbars=yes");
			}
		</script>
		<div class="row">
			<div style="float: left; margin: 5px 0 20px 0; width: 98%;">
				<?php unset($this->_sections['ls']);
$this->_sections['ls']['loop'] = is_array($_loop=$this->_tpl_vars['plays']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['ls']['name'] = 'ls';
$this->_sections['ls']['show'] = true;
$this->_sections['ls']['max'] = $this->_sections['ls']['loop'];
$this->_sections['ls']['step'] = 1;
$this->_sections['ls']['start'] = $this->_sections['ls']['step'] > 0 ? 0 : $this->_sections['ls']['loop']-1;
if ($this->_sections['ls']['show']) {
    $this->_sections['ls']['total'] = $this->_sections['ls']['loop'];
    if ($this->_sections['ls']['total'] == 0)
        $this->_sections['ls']['show'] = false;
} else
    $this->_sections['ls']['total'] = 0;
if ($this->_sections['ls']['show']):

            for ($this->_sections['ls']['index'] = $this->_sections['ls']['start'], $this->_sections['ls']['iteration'] = 1;
                 $this->_sections['ls']['iteration'] <= $this->_sections['ls']['total'];
                 $this->_sections['ls']['index'] += $this->_sections['ls']['step'], $this->_sections['ls']['iteration']++):
$this->_sections['ls']['rownum'] = $this->_sections['ls']['iteration'];
$this->_sections['ls']['index_prev'] = $this->_sections['ls']['index'] - $this->_sections['ls']['step'];
$this->_sections['ls']['index_next'] = $this->_sections['ls']['index'] + $this->_sections['ls']['step'];
$this->_sections['ls']['first']      = ($this->_sections['ls']['iteration'] == 1);
$this->_sections['ls']['last']       = ($this->_sections['ls']['iteration'] == $this->_sections['ls']['total']);
?>
				<div class="piclist">
					<img width="100" height="100"
						onclick="show('<?php if ($this->_tpl_vars['plays'][$this->_sections['ls']['index']]['water'] == 1): ?><?php echo $this->_tpl_vars['public']; ?>
/uploads/wa_<?php echo $this->_tpl_vars['plays'][$this->_sections['ls']['index']]['name']; ?>
<?php else: ?><?php echo $this->_tpl_vars['public']; ?>
/uploads/<?php echo $this->_tpl_vars['plays'][$this->_sections['ls']['index']]['name']; ?>
<?php endif; ?>')"
						src="<?php echo $this->_tpl_vars['public']; ?>
/uploads/<?php echo $this->_tpl_vars['plays'][$this->_sections['ls']['index']]['name']; ?>
"> 
					<input style="position: relative; top: -22px; overflow: hidden"
					type="checkbox" name="id[]" value="<?php echo $this->_tpl_vars['plays'][$this->_sections['ls']['index']]['id']; ?>
">

				</div>
				<?php endfor; else: ?>
				<div style="width: 100%; padding-left: 30px; line-height: 80px;">
				没有幻灯片
				</div>
				<?php endif; ?>
			</div>
		</div>
		<li class="list-group-item">
		<a href="javascript:select()">全选</a>/
		<a href="javascript:fanselect()">反选</a>/
		<a href="javascript:noselect()">全不选</a>&nbsp;&nbsp;选中项:
		<input name="del" type="image" title="删除"
			src="<?php echo $this->_tpl_vars['res']; ?>
/images/delete.gif">&nbsp;&nbsp; 
		<!-- 分页 -->	
		<span style="float: right;"> <?php echo $this->_tpl_vars['fpage']; ?>
 </span>
		</li>
	</form>
</div>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
